﻿<%
Dim Local:Set Local=New LocationCLs
Class LocationCLs
        Private KS,DomainStr,WebNameStr,NaviStr
		Private Sub Class_Initialize()
		  Set KS=New PublicCls
		  DomainStr=KS.GetDomain &"3g"
		  WebNameStr="首页"
		  NaviStr=" > "
		End Sub
        Private Sub Class_Terminate()
		 Call CloseConn()
		 Set KS=Nothing
		End Sub

		Function Kesion()
		 Dim Str
		 Select Case UCase(FCls.RefreshType)
			 Case "FOLDER"  str = GetFolderLocation
			 Case "CONTENT" str = GetContentLocation
		 End Select
         Kesion="<img src='images/home.gif' align=""absmiddle""/> " & str
       End Function

	
	Function GetFolderNaviStr()
				  Dim TSArr, I
				  TSArr = Split(KS.C_C(FCls.RefreshFolderID,8), ",")
				  For I = LBound(TSArr) To UBound(TSArr) - 1
						GetFolderNaviStr = GetFolderNaviStr & NaviStr & "<a href=""list.asp?id=" & KS.C_C(TSArr(I),9) & """>" & KS.C_C(TSArr(I),1) & "</a>"
				  Next
	End Function
	
	'取得栏目的位置导航
	Function GetFolderLocation()
				Dim FolderNaviStr:FolderNaviStr = GetFolderNaviStr()
				If FolderNaviStr="" Then
				  If Request("modelid")<>"" then
						  GetFolderLocation = "<a  href=""" & DomainStr & """>" & WebNameStr & "</a>" & FolderNaviStr & NaviStr &  "<a href=""channel.asp?id=" & Request("modelid") & """>" & KS.C_S(KS.ChkClng(Request("modelid")),1) & "</a>" 
						  if request("tj")="1" then
						  FolderNaviStr = NaviStr & "推荐" & KS.C_S(KS.ChkClng(Request("modelid")),3)
						  elseif request("rm")="1" then
						  FolderNaviStr = NaviStr & "热门" & KS.C_S(KS.ChkClng(Request("modelid")),3)
						  else
						  FolderNaviStr = NaviStr & "最新" & KS.C_S(KS.ChkClng(Request("modelid")),3)
						  end if
						  GetFolderLocation=GetFolderLocation & FolderNaviStr
				  ElseIf KS.ChkClng(Request("tid"))<>0 Then
					dim rst:set rst=conn.execute("select top 1 tname from ks_sjclass where id=" & KS.ChkClng(request("tid")))
					if not rst.eof then
					 FolderNaviStr=NaviStr & split(rst("tname"),"|")(ubound(split(rst("tname"),"|"))-1)
					end if
					rst.close:set rst=nothing
				    GetFolderLocation = "<a  href=""" & DomainStr & """>" & WebNameStr & "</a>" & NaviStr & "<a href=""channel.asp?id=9"">考试系统</a>"  & FolderNaviStr
				  end if
				Else
					If FCls.BrandName<>"" Then
						  GetFolderLocation = "<a  href=""" & DomainStr & """>" & WebNameStr & "</a>" & FolderNaviStr & NaviStr & FCls.BrandName
					Else
						  GetFolderLocation = "<a href=""" & DomainStr & """>" & WebNameStr & "</a>" & FolderNaviStr
				   End If
				End If
	End Function
	'取得信息页导航位置的函数
	Function GetContentLocation()
				Dim Str,FolderNaviStr
				'FolderNaviStr = GetFolderNaviStr()
				FolderNaviStr = NaviStr  &  "<a href=""list.asp?id=" & KS.C_C(Fcls.RefreshFolderID,9) & """>" & KS.C_C(Fcls.RefreshFolderID,1) &"</a>"
				Str =  "<a href=""" & DomainStr & """>" & WebNameStr & "</a>" & FolderNaviStr & NaviStr  & "浏览"& KS.C_S(FCls.Channelid,3)
				GetContentLocation = Str
	End Function
End Class
%>